<!DOCTYPE html>
<html>
<head>
    <style>
        div
        {
            width:100px;
            height:100px;
            position:relative;
            animation:myDiv 5s infinite;
        }

        @keyframes myDiv
        {
            0%   { border:1px solid red;}
            25%  { border:1px solid blue;}
            50%  {border:1px solid yellow;}
            75%  { border:1px solid green;}
            100% { border:1px solid red;}
        }
    </style>
</head>
<body>
<div></div>

</body>
</html>
